package com.itbaizhan.controller;

import com.itbaizhan.result.BaseResult;
import com.itbaizhan.service.BuyactionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author spf
 * @date 2024/3/6
 * @time 19:57
 */
@RestController
@RequestMapping("/buy")
public class BuyactionController {

    @Autowired
    private BuyactionService buyactionService;

    @GetMapping("/action")
    public BaseResult buyaction(@RequestParam("id") String id, @RequestParam("user") String user){
        return buyactionService.buyaction(id, user);
    }

}
